package cn.mong.util.modelexcel;

import java.awt.Rectangle;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class PositionCell implements BaseCell{
    private int row; // 单元格行号, 从0开始
    private int col; // 单元格列号, 从0开始
    private Object val;
    private int xspan; // 合并列数，大于等于1
    private int yspan; // 合并行数，大于等于1
    private int xwidth; // 字符宽度
    private CellStyleCustomizer cellStyleCustomizer;
    
    public PositionCell(int row, int col, Object val, int xspan, int yspan, int xwidth) {
        super();
        this.col = col;
        this.row = row;
        this.val = val;
        this.xspan = xspan;
        this.yspan = yspan;
        this.xwidth = xwidth;
    }
    
    public Rectangle toRectangle() {
    	return new Rectangle(col, row, xspan, yspan);
    }
    
}
